package com.yuanzong.wuliu.controller.app.system.notice;

import com.yuanzong.wuliu.common.vo.ApiResult;
import com.yuanzong.wuliu.controller.app.system.notice.param.AppSystemNoticeInfoParam;
import com.yuanzong.wuliu.controller.app.system.notice.param.AppSystemNoticePageParam;
import com.yuanzong.wuliu.service.app.system.notice.AppSystemNoticeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "app端 - 公告")
@RequestMapping("/app/system/notice/systemNotice")
@Slf4j
public class AppSystemNoticeController {

    @Autowired
    private AppSystemNoticeService appSystemNoticeService;

    @ApiOperation("分页")
    @RequestMapping(value = "/page", method = {RequestMethod.POST})
    public ApiResult page(@RequestBody AppSystemNoticePageParam param) throws Exception {
        ApiResult result = appSystemNoticeService.page(param);
        return result;
    }

    @ApiOperation("详情")
    @RequestMapping(value = "/info", method = {RequestMethod.POST})
    public ApiResult info(@RequestBody AppSystemNoticeInfoParam param) throws Exception {
        ApiResult result = appSystemNoticeService.info(param);
        return result;
    }
}
